🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / data / src / commonMain / kotlin / org / meshtastic / core / data / ai / AiFunctionResult.kt
Displaying Raw • Download
core/data/src/commonMain/kotlin/org/meshtastic/core/data/ai/AiFunctionResult.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 10.76 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.data.ai
T8b949e/** Result of a [AiFunctionProvider.sendMessage] invocation. */
Tff7b72sealed Tff7b72class T56d364SendMessageResult Tb4b4b4{
T8b949e/** Message was successfully queued for transmission. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3messageIdTb4b4b4: Tffa657IntTb4b4b4, Tff7b72val Te6edf3channelTb4b4b4: Tffa657StringTb4b4b4, Tff7b72val Te6edf3timestampTb4b4b4: Tffa657LongTb4b4b4) Tb4b4b4: Te6edf3SendMessageResultTb4b4b4(Tb4b4b4)
T8b949e/** Device is not connected to a Meshtastic radio. */
Tff7b72data Tff7b72class T56d364NotConnectedTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3SendMessageResultTb4b4b4(Tb4b4b4)
T8b949e/** The provided name matched multiple candidates. */
Tff7b72data Tff7b72class T56d364AmbiguousNameTb4b4b4(Tff7b72val Te6edf3candidatesTb4b4b4: Te6edf3ListTff7b72<Tffa657StringTff7b72>Tb4b4b4) Tb4b4b4: Te6edf3SendMessageResultTb4b4b4(Tb4b4b4)
T8b949e/** An argument was invalid (e.g., message too long, name not found). */
Tff7b72data Tff7b72class T56d364InvalidArgumentTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3SendMessageResultTb4b4b4(Tb4b4b4)
T8b949e/** Rate limit exceeded — too many AI-triggered sends in the time window. */
Tff7b72data Tff7b72class T56d364RateLimitedTb4b4b4(Tff7b72val Te6edf3retryAfterSecondsTb4b4b4: Tffa657IntTb4b4b4) Tb4b4b4: Te6edf3SendMessageResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Result of a [AiFunctionProvider.getMeshStatus] invocation. */
Tff7b72data Tff7b72class T56d364MeshStatusResultTb4b4b4(
T8b949e/** Current connection state (e.g., "CONNECTED", "DISCONNECTED"). */
Tff7b72val Te6edf3connectionStateTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Number of nodes heard within the online threshold. */
Tff7b72val Te6edf3onlineNodeCountTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Total number of nodes in the local database. */
Tff7b72val Te6edf3totalNodeCountTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Local device battery level (0-100), or null if unavailable. */
Tff7b72val Te6edf3localBatteryLevelTb4b4b4: Tffa657Int?Tb4b4b4,
T8b949e/** Display name of the local node, or null if not yet configured. */
Tff7b72val Te6edf3localNodeNameTb4b4b4: Tffa657String?Tb4b4b4,
Tb4b4b4)
T8b949e/** Result of a [AiFunctionProvider.getNodeList] invocation. */
Tff7b72sealed Tff7b72class T56d364GetNodeListResult Tb4b4b4{
T8b949e/** Successfully retrieved the list of visible mesh nodes. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3nodesTb4b4b4: Te6edf3ListTff7b72<Te6edf3NodeSummaryTff7b72>Tb4b4b4) Tb4b4b4: Te6edf3GetNodeListResultTb4b4b4(Tb4b4b4)
T8b949e/** Device is not connected to a Meshtastic radio. */
Tff7b72data Tff7b72class T56d364NotConnectedTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetNodeListResultTb4b4b4(Tb4b4b4)
T8b949e/** An error occurred retrieving the node list. */
Tff7b72data Tff7b72class T56d364ErrorTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetNodeListResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Summary information for a single mesh node. */
Tff7b72data Tff7b72class T56d364NodeSummaryTb4b4b4(
T8b949e/** Node ID in Meshtastic hex format (e.g., "!abc12345"). */
Tff7b72val Te6edf3idTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Display name of the node. */
Tff7b72val Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Battery level (0-100), or null if unavailable. */
Tff7b72val Te6edf3batteryLevelTb4b4b4: Tffa657Int?Tb4b4b4,
T8b949e/** Last time this node was heard from (milliseconds since epoch). */
Tff7b72val Te6edf3lastHeardTb4b4b4: Tffa657LongTb4b4b4,
T8b949e/** Whether this node is currently considered online. */
Tff7b72val Te6edf3isOnlineTb4b4b4: Tffa657BooleanTb4b4b4,
Tb4b4b4)
T8b949e/** Result of a [AiFunctionProvider.getChannelInfo] invocation. */
Tff7b72sealed Tff7b72class T56d364GetChannelInfoResult Tb4b4b4{
T8b949e/** Successfully retrieved the list of channels. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3channelsTb4b4b4: Te6edf3ListTff7b72<Te6edf3ChannelSummaryTff7b72>Tb4b4b4) Tb4b4b4: Te6edf3GetChannelInfoResultTb4b4b4(Tb4b4b4)
T8b949e/** Device is not connected to a Meshtastic radio. */
Tff7b72data Tff7b72class T56d364NotConnectedTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetChannelInfoResultTb4b4b4(Tb4b4b4)
T8b949e/** An error occurred retrieving channel info. */
Tff7b72data Tff7b72class T56d364ErrorTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetChannelInfoResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Summary information for a single mesh channel. */
Tff7b72data Tff7b72class T56d364ChannelSummaryTb4b4b4(
T8b949e/** Channel index (0-7). */
Tff7b72val Te6edf3indexTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Display name of the channel. */
Tff7b72val Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Whether this is the primary/default channel. */
Tff7b72val Te6edf3isPrimaryTb4b4b4: Tffa657BooleanTb4b4b4,
T8b949e/** Uplink enabled for this channel. */
Tff7b72val Te6edf3uplinkEnabledTb4b4b4: Tffa657BooleanTb4b4b4,
T8b949e/** Downlink enabled for this channel. */
Tff7b72val Te6edf3downlinkEnabledTb4b4b4: Tffa657BooleanTb4b4b4,
Tb4b4b4)
T8b949e/** Result of a [AiFunctionProvider.getDeviceStatus] invocation. */
Tff7b72sealed Tff7b72class T56d364GetDeviceStatusResult Tb4b4b4{
T8b949e/** Successfully retrieved device status. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3deviceTb4b4b4: Te6edf3DeviceStatusTb4b4b4) Tb4b4b4: Te6edf3GetDeviceStatusResultTb4b4b4(Tb4b4b4)
T8b949e/** Device is not available or not connected. */
Tff7b72data Tff7b72class T56d364NotAvailableTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetDeviceStatusResultTb4b4b4(Tb4b4b4)
T8b949e/** An error occurred retrieving device status. */
Tff7b72data Tff7b72class T56d364ErrorTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetDeviceStatusResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Status and metrics of the local mesh radio device. */
Tff7b72data Tff7b72class T56d364DeviceStatusTb4b4b4(
T8b949e/** Device model/hardware (e.g., "Meshtastic nRF52840"). */
Tff7b72val Te6edf3modelTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Firmware version string. */
Tff7b72val Te6edf3firmwareVersionTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Battery level (0-100), or null if not battery-powered. */
Tff7b72val Te6edf3batteryLevelTb4b4b4: Tffa657Int?Tb4b4b4,
T8b949e/** Charging status: "CHARGING", "NOT_CHARGING", or "UNKNOWN". */
Tff7b72val Te6edf3chargingStatusTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Display name of the device. */
Tff7b72val Te6edf3deviceNameTb4b4b4: Tffa657String?Tb4b4b4,
T8b949e/** Whether the radio is currently transmitting or receiving. */
Tff7b72val Te6edf3isActiveTb4b4b4: Tffa657BooleanTb4b4b4,
Tb4b4b4)
T8b949e/** Result of a [AiFunctionProvider.getNodeDetails] invocation. */
Tff7b72sealed Tff7b72class T56d364GetNodeDetailsResult Tb4b4b4{
T8b949e/** Successfully retrieved node details. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3nodeTb4b4b4: Te6edf3NodeDetailsTb4b4b4) Tb4b4b4: Te6edf3GetNodeDetailsResultTb4b4b4(Tb4b4b4)
T8b949e/** Device is not connected to a Meshtastic radio. */
Tff7b72data Tff7b72class T56d364NotConnectedTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetNodeDetailsResultTb4b4b4(Tb4b4b4)
T8b949e/** Node with given ID not found. */
Tff7b72data Tff7b72class T56d364NotFoundTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetNodeDetailsResultTb4b4b4(Tb4b4b4)
T8b949e/** An error occurred retrieving node details. */
Tff7b72data Tff7b72class T56d364ErrorTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetNodeDetailsResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Detailed telemetry and status for a specific node. */
Tff7b72data Tff7b72class T56d364NodeDetailsTb4b4b4(
T8b949e/** Node ID in Meshtastic hex format (e.g., "!abc12345"). */
Tff7b72val Te6edf3idTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** User ID string for this node. */
Tff7b72val Te6edf3userIdTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Display name of the node. */
Tff7b72val Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Battery level (0-100), or null if unavailable. */
Tff7b72val Te6edf3batteryLevelTb4b4b4: Tffa657Int?Tb4b4b4,
T8b949e/** Supply voltage in volts, or null if unavailable. */
Tff7b72val Te6edf3voltageTb4b4b4: Tffa657Float?Tb4b4b4,
T8b949e/** Hardware model (e.g., "Meshtastic nRF52840"). */
Tff7b72val Te6edf3hardwareModelTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Firmware version string. */
Tff7b72val Te6edf3firmwareVersionTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Signal-to-noise ratio in dB of the strongest received signal, or null if this node has no reading. */
Tff7b72val Te6edf3snrTb4b4b4: Tffa657Float?Tb4b4b4,
T8b949e/** Received signal strength indicator in dBm, or null if this node has no reading. */
Tff7b72val Te6edf3rssiTb4b4b4: Tffa657Int?Tb4b4b4,
T8b949e/** Number of hops away from the local node (-1 if unknown). */
Tff7b72val Te6edf3hopsAwayTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Channel index this node is on. */
Tff7b72val Te6edf3channelTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Last time this node was heard from (milliseconds since epoch). */
Tff7b72val Te6edf3lastHeardTb4b4b4: Tffa657LongTb4b4b4,
T8b949e/** User role or device type (e.g., "CLIENT", "REPEATER"). */
Tff7b72val Te6edf3userRoleTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Whether user is licensed to operate this hardware. */
Tff7b72val Te6edf3isLicensedTb4b4b4: Tffa657BooleanTb4b4b4,
T8b949e/** Latitude (degrees), or null if not available. */
Tff7b72val Te6edf3latitudeTb4b4b4: Tffa657Double?Tb4b4b4,
T8b949e/** Longitude (degrees), or null if not available. */
Tff7b72val Te6edf3longitudeTb4b4b4: Tffa657Double?Tb4b4b4,
Tb4b4b4)
T8b949e/** Result of a [AiFunctionProvider.getMeshMetrics] invocation. */
Tff7b72sealed Tff7b72class T56d364GetMeshMetricsResult Tb4b4b4{
T8b949e/** Successfully retrieved mesh metrics. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3metricsTb4b4b4: Te6edf3MeshMetricsTb4b4b4) Tb4b4b4: Te6edf3GetMeshMetricsResultTb4b4b4(Tb4b4b4)
T8b949e/** Device is not connected to a Meshtastic radio. */
Tff7b72data Tff7b72class T56d364NotConnectedTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetMeshMetricsResultTb4b4b4(Tb4b4b4)
T8b949e/** An error occurred retrieving mesh metrics. */
Tff7b72data Tff7b72class T56d364ErrorTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetMeshMetricsResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Aggregate network metrics and statistics for the entire mesh. */
Tff7b72data Tff7b72class T56d364MeshMetricsTb4b4b4(
T8b949e/** Total number of nodes known to this device. */
Tff7b72val Te6edf3totalNodeCountTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Number of nodes that are currently online. */
Tff7b72val Te6edf3onlineNodeCountTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Average battery level across all nodes, or null if unknown. */
Tff7b72val Te6edf3averageBatteryLevelTb4b4b4: Tffa657Int?Tb4b4b4,
T8b949e/** Estimated mesh health score (0-100), based on connectivity and node activity. */
Tff7b72val Te6edf3meshHealthScoreTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Timestamp of the most recent packet received (milliseconds since epoch). */
Tff7b72val Te6edf3mostRecentPacketTimeTb4b4b4: Tffa657LongTb4b4b4,
T8b949e/** Mesh uptime since local node startup (seconds). */
Tff7b72val Te6edf3meshUptimeSecondsTb4b4b4: Tffa657LongTb4b4b4,
T8b949e/** Estimated channel utilization percentage (0-100), or null if unavailable. */
Tff7b72val Te6edf3channelUtilizationPercentTb4b4b4: Tffa657Int?Tb4b4b4,
Tb4b4b4)
T8b949e/** Result of a [AiFunctionProvider.getRecentMessages] invocation. */
Tff7b72sealed Tff7b72class T56d364GetRecentMessagesResult Tb4b4b4{
T8b949e/** Successfully retrieved recent messages. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3messagesTb4b4b4: Te6edf3ListTff7b72<Te6edf3MessageSummaryTff7b72>Tb4b4b4) Tb4b4b4: Te6edf3GetRecentMessagesResultTb4b4b4(Tb4b4b4)
T8b949e/** The specified contact was not found via fuzzy matching. */
Tff7b72data Tff7b72class T56d364ContactNotFoundTb4b4b4(Tff7b72val Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetRecentMessagesResultTb4b4b4(Tb4b4b4)
T8b949e/** An error occurred retrieving messages. */
Tff7b72data Tff7b72class T56d364ErrorTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetRecentMessagesResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Summary of a single mesh message suitable for AI consumption. */
Tff7b72data Tff7b72class T56d364MessageSummaryTb4b4b4(
T8b949e/** Display name of the message sender. */
Tff7b72val Te6edf3senderNameTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** The message text content. */
Tff7b72val Te6edf3textTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Channel or contact name this message belongs to. */
Tff7b72val Te6edf3contactNameTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** When the message was received (milliseconds since epoch). */
Tff7b72val Te6edf3receivedTimeTb4b4b4: Tffa657LongTb4b4b4,
T8b949e/** Whether this message was sent by the local user. */
Tff7b72val Te6edf3fromLocalTb4b4b4: Tffa657BooleanTb4b4b4,
T8b949e/** Whether this message has been read. */
Tff7b72val Te6edf3readTb4b4b4: Tffa657BooleanTb4b4b4,
Tb4b4b4)
T8b949e/** Result of a [AiFunctionProvider.getUnreadSummary] invocation. */
Tff7b72sealed Tff7b72class T56d364GetUnreadSummaryResult Tb4b4b4{
T8b949e/** Successfully retrieved unread summary. */
Tff7b72data Tff7b72class T56d364SuccessTb4b4b4(Tff7b72val Te6edf3summaryTb4b4b4: Te6edf3UnreadSummaryTb4b4b4) Tb4b4b4: Te6edf3GetUnreadSummaryResultTb4b4b4(Tb4b4b4)
T8b949e/** An error occurred retrieving unread summary. */
Tff7b72data Tff7b72class T56d364ErrorTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4: Te6edf3GetUnreadSummaryResultTb4b4b4(Tb4b4b4)
Tb4b4b4}
T8b949e/** Unread message summary across all contacts. */
Tff7b72data Tff7b72class T56d364UnreadSummaryTb4b4b4(
T8b949e/** Total number of unread messages across all contacts. */
Tff7b72val Te6edf3totalUnreadCountTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Per-contact breakdown of unread messages (excludes muted contacts). */
Tff7b72val Te6edf3contactsTb4b4b4: Te6edf3ListTff7b72<Te6edf3ContactUnreadTff7b72>Tb4b4b4,
Tb4b4b4)
T8b949e/** Unread info for a single contact or channel. */
Tff7b72data Tff7b72class T56d364ContactUnreadTb4b4b4(
T8b949e/** Display name of the contact or channel. */
Tff7b72val Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
T8b949e/** Number of unread messages from this contact. */
Tff7b72val Te6edf3unreadCountTb4b4b4: Tffa657IntTb4b4b4,
T8b949e/** Preview of the last message text, or null if none. */
Tff7b72val Te6edf3lastMessagePreviewTb4b4b4: Tffa657String?Tb4b4b4,
T8b949e/** Timestamp of the last message (milliseconds since epoch), or null if none. */
Tff7b72val Te6edf3lastMessageTimeTb4b4b4: Tffa657Long?Tb4b4b4,
Tb4b4b4)
Served by rngit 1.5.0 - Generated in 0.07s